<extend name="./masterHome"/>
<block name="content">

    </div>

    <div class="user-body">
        <div class="user-container">
            <div class="user-crumbs m-b-10"><a href="#">首页</a> &gt; 我的订单</div>
            <div class="clearfix_new">
                <div class="user-menu m-r-20">
                    <div class="menu-title">个人中心</div>
                    <div class="menu-list"><a class="menu-item item-active" href="#"
                                              data-monitor="user_myorder_myorder">我的订单</a> <a class="menu-item" href="#"
                                                                                              data-monitor="user_mycoupon_mycoupon">我的优惠券</a>
                        <a class="menu-item" href="#" data-monitor="user_myfavorite_myfavorite">我的喜欢</a> <a
                                class="menu-item" href="#" data-monitor="user_book_book">我的预约</a> <a class="menu-item"
                                                                                                     href="#"
                                                                                                     data-monitor="user_address_address">收货地址</a>
                    </div>
                    <div class="menu-title">售后服务</div>
                    <div class="menu-list"><a class="menu-item" href="#"
                                              data-monitor="user_returnlist_returnlist">退货记录</a> <a class="menu-item"
                                                                                                    href="#"
                                                                                                    data-monitor="user_barter_barter">换货记录</a>
                    </div>
                </div>


                <div class="user-main">


                    <div class="order-main clearfix_new"><h1 style="border:0"> 我的订单 <a href="#"
                                                                                       data-monitor="user_myorder_consult"
                                                                                       onclick="showServiceSelector()"
                                                                                       class="inline-kefu"></a> <a
                            href="#" class="phone-order-link">  </a></h1>
                        <div class="mod-user-list">
                            <ul id="ul_order_type" class="order_type" style="margin-bottom:20px;padding:0 0 0 10px">
                                <li data-order_type="-1" _class="cur" data-status="-1" class="enable"><a
                                        data-monitor="user_myorder_allstatus" class="order_type_title" data-href="#"
                                        href="#"> 全部订单<span style="display:none" class="order_type_count">1</span></a>
                                </li>
                                <li data-order_type="0" _class="disable" data-status="0" class="enable"><a
                                        data-monitor="user_myorder_waitpay" class="order_type_title" data-href="#"
                                        href="#"> 待付款<span class="order_type_count"
                                                           style="color: rgb(255, 120, 0);">1</span></a></li>
                                <li data-order_type="1" _class="disable" data-status="1"><a
                                        data-monitor="user_myorder_waitgoods" class="order_type_title"
                                        data-href="/user/myorder/?status=1"> 待发货<span
                                        class="order_type_count"></span></a></li>
                                <li data-order_type="2" _class="enable" data-status="3"><a
                                        data-monitor="user_myorder_getgoods" class="order_type_title"
                                        data-href="/user/myorder/?status=3"> 已发货<span
                                        class="order_type_count"></span></a></li>
                                <li data-order_type="3" _class="enable" data-status="4"><a
                                        data-monitor="user_myorder_allover" class="order_type_title"
                                        data-href="/user/myorder/?status=4"> 已完成<span
                                        class="order_type_count"></span></a></li>
                                <li data-order_type="4" _class="enable" data-status="2"><a data-monitor=""
                                                                                           class="order_type_title"
                                                                                           data-href="/user/myorder/?status=2">
                                    已关闭<span class="order_type_count"></span></a></li>
                            </ul>
                            <table style="" width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tbody>
                                <tr class="list-title">
                                    <th class="list-col1">订单信息</th>
                                    <th class="list-col2">订单金额</th>
                                    <th class="list-col3">订单状态</th>
                                    <th class="list-col4">操作</th>
                                </tr>
                                </tbody>


                                <foreach name="data" item="v">



                                <tbody>
                                <tr class="list-order-info">
                                    <td colspan="4"> 订单编号： <b class="m-r-20">{$v['number']}</b>提交时间：{:date("Y:m:d H:i:s",$v['time'])}
                                    </td>
                                </tr>

                            <foreach name="v['list']"  key='kk' item="vv">
                                <tr class="list-order-detail">
                                    <td>

                                        <foreach name="v['list']" item="bb">
                                        <div class="item-product clearfix_new"><a
                                                href="#"
                                                target="_blank" title="Sense-U感动夹子 智能身姿矫正器"><img class="item-img"
                                                                                                 src="__ROOT__/{$bb['pic']}"></a>
                                            <div class="item-txt"><p><a href="#" target="_blank"
                                                                        title="Sense-U感动夹子 智能身姿矫正器">{$vv['gname']}</a></p>
                                                <p>￥{$bb['subtotal']}/{$bb['quantity']}</p></div>
                                            <div class="item-count">x{$bb['quantity']}</div>
                                        </div>

                                        </foreach>

                                    </td>
                                    <td> ￥{$vv['or_total']}<p class="item-fee">(运费￥0.00)</p></td>
                                    <td> 等待付款</td>
                                    <td><p class="countdonw_time countdonw_time_disable" data-countdown_time="6511000">
                                        0时0分0秒</p>
                                        <p class="fukuan_info" style="display: none;">前完成付款<img
                                                src="./360商城1_files/t0163b13d0b9ff4f520.png"></p> <a
                                                class="qufukuan_link mod-btn-orange" target="_blank" href="from=user">去付款</a>
                                        <p><a href="#" class="item-console">详情</a> <span class="p05">|</span> <a
                                                href="#" onclick="return false" class="console-cancel">取消订单</a></p></td>
                                </tr>
                                    </foreach>
                                </tbody>
                                </foreach>

                            </table>


                        </div>
                    </div>


                    <div id="countdown_tip" class="dialog_wrap">
                        <div class="xiasanjiao">▼</div>
                        <div class="dialog_content"><p style="width:180px">请您尽快完成付款，否则您提交的订单会自动取消！</p></div>
                    </div>
                    <div id="wuliu" class="wuliu_wrap" style="left:100px;top:100px;z-index:100">
                        <div class="shangsanjiao">▲</div>
                        <div class="dialog_content"><p
                                style="border-bottom:1px solid #ececec;color:#666;font-weight:700;height:40px;line-height:40px;width:375px">
                            <span style="display:inline-block;margin-left:35px">处理时间</span><span
                                style="display:inline-block;margin-left:150px">订单信息</span></p>
                            <p class="loading">数据加载中...</p>
                            <ul class="order_info_ul"></ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


    </div>

</block>

<script>
    function Timer(e) {
        function t(e) {
            this._init(e), this._runningflag
        }

        return t.prototype = {
            _init: function (e) {
                this.params = e
            }, run: function () {
                function e(e) {
                    var t = 0, n = 0, r = 0, i = 0, s = 0;
                    return e > 0 && (t = parseInt(e / 864e5), n = parseInt(e / 36e5 % 24), r = parseInt(e / 6e4 % 60), i = parseInt(e / 1e3 % 60), s = e % 1e3), {
                        days: t,
                        hours: n,
                        minutes: r,
                        second: i,
                        millisecond: s
                    }
                }

                var t = this;
                t.params.immediately && t.params.callback(t.params.milliseconds, e(t.params.milliseconds));
                var n = setInterval(function () {
                    t.params.milliseconds -= t.params.interval;
                    if (t.params.milliseconds < 0) {
                        clearInterval(n), t.params.callback(0, e(t.params.milliseconds)), t.end();
                        return
                    }
                    t.params.callback(t.params.milliseconds, e(t.params.milliseconds))
                }, this.params.interval)
            }, end: function () {
                this.params.fnEnd && this.params.fnEnd()
            }
        }, new t(e)
    }


    $(function () {
        var li = $('#ul_order_type.order_type li');
        li.removeClass('cur,disable,enable');
        var status = '{% int($smarty.get.status)%}';
        li.each(function () {
            if (status == '') {
                status = -1;
            }
            var val = parseInt($(this).find('span.order_type_count').html());

            if (val > 0) {
                $(this).addClass('enable');
                var link = $(this).find('a');
                $(link).attr('href', $(link).data('href'));
                if ($(this).attr("data-order_type") == 0) {
                    $(this).find(".order_type_count").css("color", "#ff7800")
                }
                if ($(this).attr("data-order_type") == 3) {
                    $(this).find(".order_type_count").css("color", "#82c92f")
                }
            } else if (val == 0) {
                $(this).addClass('disable');
            }

            if (status == $(this).data('status')) {
                $(this).removeClass('cur,disable,enable');
                $(this).addClass("cur");
            }
        })
    });


    $(function () {
        $('.countdonw_time').each(function () {
            var _this = this;
            Timer({
                milliseconds: $(this).data('countdown_time'),
                interval: 500,
                immediately: true,
                callback: function (milliseconds, desc) {
                    $(_this).html(desc.hours + '时' + desc.minutes + "分" + desc.second + "秒")
                },
                fnEnd: function () {
                    $(_this).addClass('countdonw_time_disable');
                    $('.fukuan_info').hide();
                }
            }).run();
        });
    });

    $(function () {
        $('.fukuan_info').hover(function () {
            var _this = this;
            $("#countdown_tip").css({
                left: $(_this).position().left - 100,
                top: $(_this).position().top - 70
            }).show();
        }, function () {
            $("#countdown_tip").hide();
        });
    });




</script>



